package com.fix.demo.day3.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fix.demo.day3.HeroDao;
import com.fix.demo.day3.HeroService;
import com.github.pagehelper.PageHelper;

@Service
public class HeroServiceImpl implements HeroService{
	
	@Autowired
	HeroDao heroDao;

	@Override
	public List getPage(int page) {
		PageHelper.startPage(page, 10);  //分页
		List list =heroDao.getAll();
		return list;
	}
	
	

}
